//
//  BaseLineCell.m
//  QuXiang
//
//  Created by Duncan on 2020/6/22.
//  Copyright © 2020 NanHuaiZi. All rights reserved.
//

#import "BaseLineCell.h"

@interface BaseLineCell ()


@end

@implementation BaseLineCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self.contentView addSubview:self.lineView];
        [self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.right.top.equalTo(self.contentView);
            make.height.mas_equalTo(1);
        }];
    }
    return self;
}

- (void)centerMasLayout {
    [self.lineView mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView.mas_left).offset(kFragmemtFloat(16));
        make.right.equalTo(self.contentView.mas_right).offset(-kFragmemtFloat(16));
        make.height.mas_equalTo(1);
        make.top.equalTo(self.contentView);
    }];
}

#pragma mark ------- Lazy Methods -------

- (UIView *)lineView {
    if (!_lineView) {
        _lineView = [[UIView alloc] init];
        _lineView.backgroundColor = k_Color_LineColor;
    }
    return _lineView;
}

@end
